<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>信息配置</title>
	<include file="Public:header" />
	<style type="text/css">
		.m-input{width:200px;border:1px solid #ccc;padding:2px;}
	</style>
	<script type="text/javascript">
		function chkfrm()
		{
			$('#form1').submit();
		}
		
	</script>
</head>
<body class="">
	<div class="demo-info space-out-5px">
		<div class="demo-tip icon-tip"></div>
		<div>快速定制相关的系统运行参数</div>
	</div>
	<div class=" space-out-10px">
	

	<form id="form1" method="post" action="{:U('Index/web_config_save')}">
	<table style="width:100%;" border="0"  cellpadding="3" cellspacing="2" class="form_table">
	<php>$vargroup='';</php><php></php>
	<volist name="config_list" id="config_list">
	<php>if($vargroup==''){</php>
	<tr><td class="w100px" style="background:#F4E4B4; text-align:center;"><b>
	<switch name="config_list.vargroup" >
		<case value="basic">基础设置</case>
		<case value="alipay">支付宝设置</case>
		<case value="smtp">SMTP设置</case>
		<case value="other">其他设置</case>
		<default />
	</switch></b>
	</td><td  colspan="4"></td></tr>
	<php>}</php>
	
	<php>if($vargroup!='' && $vargroup!=$config_list['vargroup']){</php>
	<tr><td class="w100px" style="background:#F4E4B4; text-align:center;"><b>
	<switch name="config_list.vargroup" >
		<case value="basic">基础设置</case>
		<case value="alipay">支付宝设置</case>
		<case value="smtp">SMTP设置</case>
		<case value="other">其他设置</case>
		<default />
	</switch></b>
	</td><td  colspan="4"></td></tr>
	<php>}</php>
	<tr>
		<td class="w100px">&nbsp;</td>
		<td class="w130px">{$config_list.varinfo}：</td>
		<td class="w200px">
		<switch name="config_list.vartype">
		<case value="string"><input type="text" id="{$config_list.varname}" name="{$config_list.varname}" value="{$config_list.varvalue}" class="m-input" /></case>
		<case value="number"><input type="text" id="{$config_list.varname}" name="{$config_list.varname}" value="{$config_list.varvalue}" class="m-input" /></case>
		<case value="bool"><input type="radio" name="{$config_list.varname}" value="Y"<if condition="$config_list['varvalue'] eq 'Y'"> checked</if> />是  <input type="radio" name="{$config_list.varname}" value="N"<if condition="$config_list['varvalue'] eq 'N'"> checked</if> />否</case>
		<case value="bstring"><textarea name="{$config_list.varname}" id="{$config_list.varname}" style="margin:7px 0;height:60px;" class="m-input">{$config_list.varvalue}</textarea></case>
		<default />
		</switch>
		</td>
		<td class="w250px">${$config_list.varname} - [<a href="{:U('Index/web_config_del?var='.$config_list['varname'].'')}">删除</a>]</td>
		<td class="">排序号：{$config_list.orderid}</td>	
	</tr>
	
	<php>$vargroup=$config_list['vargroup'];</php>

	</volist>
	</table>
	
	<div style="height:20px;"></div>
	<div class="list-title">
		<div class="list-t-l w300px"></div>
		<div class="list-t-l w200px"><a href="javascript:;" class="easyui-linkbutton" iconCls="icon-save" onclick="chkfrm()">保存</a></div>
		<div class="list-t-r"></div>
	</div>
	</form>
	
	<form id="frm_add" method="post" action="{:U('Index/web_config_add_save')}">
	<fieldset style="border:1px dashed #ff9966; padding:15px;"><legend><h3>增加新的全局变量</h3></legend>
	<table style="width:100%;" border="0"  cellpadding="3" cellspacing="2" class="form_table">
		<tr><td class="w100px">变量名</td><td><input type="text" id="varname" name="varname" value="" class="m-input" /></td></tr>
		<tr><td class="w100px">变量描述</td><td><input type="text" id="varinfo" name="varinfo" value="" class="m-input" /></td></tr>
		<tr><td class="w100px">变量组名</td><td><select id="vargroup" name="vargroup" class="easyui-combobox" editable="false" style="width:190px;">
								<option value='basic'>基础设置</option>
								<option value='alipay'>支付宝设置</option>
								<option value='smtp'>SMTP设置</option>
								<option value='other' selected>其他设置</option>
								</select></td></tr>
		<tr><td class="w100px">变量类型</td><td><select id="vartype" name="vartype" class="easyui-combobox" editable="false" style="width:190px;">
								<option value='string'>字符串</option>
								<option value='bstring'>长字符串</option>
								<option value='number'>数字</option>
								<option value='bool'>布尔(是/否)</option>
								</select></td></tr>
		<tr><td class="w100px">变量值</td><td><input type="text" id="varvalue" name="varvalue" value="" class="m-input" /></td></tr>
		<tr><td class="w100px">排序号</td><td><input type="text" id="orderid" name="orderid" value="0" class="m-input" /></td></tr>
	</table>
	<div style="height:20px;"></div>
	<div class="list-title">
		<div class="list-t-l w300px"></div>
		<div class="list-t-l w200px"><a href="javascript:;" class="easyui-linkbutton" iconCls="icon-save" onclick="$('#frm_add').submit()">新增</a></div>
		<div class="list-t-r"></div>
	</div>
	</fieldset>
	</form>
	
	
	</div>
</body>
</html>
